/*
 * WYMeditor : what you see is What You Mean web-based editor
 * Copyright (c) 2008 Jean-Francois Hovinne, http://www.wymeditor.org/
 * Dual licensed under the MIT (MIT-license.txt)
 * and GPL (GPL-license.txt) licenses.
 *
 * For further information visit:
 *        http://www.wymeditor.org/
 *
 * File Name:
 *        jquery.wymeditor.hovertools.js
 *        hovertools plugin for WYMeditor
 *
 * File Authors:
 *        Jean-Francois Hovinne (jf.hovinne a-t wymeditor dotorg)
 */

//Extend WYMeditor
WYMeditor.editor.prototype.insertimg = function() {
	var wym = this;
	var html = '<li class="wym_tools_gallery"><a href="#"  title="Add image from gallery"' +
	' style="background-image: url(wymeditor/skins/default/icons.png)">Add image from gallery</a></li>';
	jQuery(wym._box).find(wym._options.toolsSelector + wym._options.toolsListSelector).append(html);
	jQuery(wym._box).find('li.wym_tools_gallery a').click(function() {
		alert('Test');
		g_window = window.open('insert.php', 'filebrowser', 'height=600,width=840,resizable=yes,scrollbars=yes');
		g_window.focus();
		return(false);
	});
};


